www.gusucode.com > 环保时代家庭财务管理系统 EPffms v4.0 > 环保时代家庭财务管理系统 EPffms v4.0\code\eptimehome\update.asp
<!-- #include file="conn.asp" --> <% Dim Conn,ConnStr,oCat,oTbl ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&accessFilePath&"") Set oCat1=Server.CreateObject("ADOX.Catalog") oCat1.ActiveConnection = ConnStr Set oTbl1 = Server.CreateObject("ADOX.Table") Set oTbl1 = oCat1.Tables("Idea_admin") '要重命名的表名:OldTable oTbl1.Name = "Eptime_admin" '新表名 Set oCat1 = Nothing Set oTbl1 = Nothing response.Write("重命名的表【Idea_admin】成功!......<br>") Set oCat2=Server.CreateObject("ADOX.Catalog") oCat2.ActiveConnection = ConnStr Set oTbl2 = Server.CreateObject("ADOX.Table") Set oTbl2 = oCat2.Tables("shiwei_money") '要重命名的表名:OldTable oTbl2.Name = "Eptime_money" '新表名 Set oCat2 = Nothing Set oTbl2 = Nothing response.Write("重命名的表【shiwei_money】成功!......<br>") Set oCat3=Server.CreateObject("ADOX.Catalog") oCat3.ActiveConnection = ConnStr Set oTbl3 = Server.CreateObject("ADOX.Table") Set oTbl3 = oCat3.Tables("money_bigclass") '要重命名的表名:OldTable oTbl3.Name = "Eptime_money_bigclass" '新表名 Set oCat3 = Nothing Set oTbl3 = Nothing response.Write("重命名的表【money_bigclass】成功!......<br>") Set oCat4=Server.CreateObject("ADOX.Catalog") oCat4.ActiveConnection = ConnStr Set oTbl4 = Server.CreateObject("ADOX.Table") Set oTbl4 = oCat4.Tables("money_smallclass") '要重命名的表名:OldTable oTbl4.Name = "Eptime_money_smallclass" '新表名 Set oCat4 = Nothing Set oTbl4 = Nothing response.Write("重命名的表【money_smallclass】成功!......<br>") Conn.Execute("CREATE TABLE Eptime_diary(EP_id int IDENTITY,Ep_title nvarchar(100) NULL,EP_ok int null,EP_content text,EP_date date default date(),EP_addtime date default now(),EP_ip varchar(50) null,EP_author int null)") response.Write("新建表【Eptime_diary】成功!......<br>") Conn.Execute("create table Eptime_diary_reply (EP_id integer identity(1,1) primary key,EP_username varchar(50) null,EP_content text,EP_addtime date default now(),EP_diaryid int NULL)") response.Write("新建表【Eptime_diary_reply】成功!......<br>") %> 数据库升级完毕!